package xian.woniuxy.web.controller;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import xian.woniuxy.util.ResultVO;


@ControllerAdvice
public class MyExceptionHandler {
    @ExceptionHandler(Exception.class)
    @ResponseBody
    public ResultVO f1(Exception e){
        e.printStackTrace();
        System.out.println("出错了...");
        return new ResultVO(500,e.toString(),null);
    }
}
